doe_model Derived Type

type, public :: doe_model

A model used to represent a design of experiments result. The model is of the following form.

The cross and squared terms are included for a two-way model, and the triple terms are added for a three-way model. Each unique combination of factors appears exactly once. For two factors, a two-way model is .


Components

Type Visibility Attributes Name Initial
real(kind=real64), public, allocatable, dimension(:) :: coefficients

The model coefficients, where N is the number of factors. The coefficients are ordered as follows, with each group included only if the model has a sufficient number of interaction levels.

  1. The constant term: (1 term).
  2. Main effects, : (N terms). Included for nway >= 1.
  3. Two-way cross terms, in lexicographic order: (N(N-1)/2 terms). Included for nway >= 2.
  4. Squared terms: (N terms). Included for nway >= 2.
  5. Three-way cross terms, in lexicographic order: (N(N-1)(N-2)/6 terms). Included for nway >= 3.
  6. Squared-by-linear terms , , with i as the outer index and j as the inner index: (N(N-1) terms). Included for nway >= 3.
  7. Cubed terms: (N terms). Included for nway >= 3.

For example, with N = 2 and nway = 2, the order is .

real(kind=real64), public, allocatable, dimension(:,:) :: covariance

The unscaled parameter covariance matrix , where is the design matrix used to fit the model. Only the parameters included in the model (map = true) are represented, in coefficient order.
This is populated by doe_fit_model, and is used to compute prediction intervals.

integer(kind=int32), public :: dof = 0

The residual degrees of freedom of the fit, . A value of zero indicates the fit information is not available (e.g. the model was not created by doe_fit_model).

logical, public, allocatable, dimension(:) :: map

An array denoting if a model coefficient should be included as part of the model (true), or neglected (false).

real(kind=real64), public :: mse = 0.0d0

The residual mean squared error of the fit, . This is only meaningful if dof > 0.

integer(kind=int32), public :: nway

The number of interaction levels.

type(regression_statistics), public, allocatable, dimension(:) :: stats

Statistical information for each model parameter.